#include "lv_filter.h"


void lv_filter_init(_lv_filter *filter, u16 value, u8 coe)
{
    filter->coe = coe;
    // filter->input = value;
    filter->output = value;
    filter->sum = (u32)value << filter->coe;
}

void lv_filter_reset(_lv_filter *filter, u16 value)
{
    // filter->input = value;
    filter->output = value;
    filter->sum = (u32)value << filter->coe;
}

void lv_filter_set_coe(_lv_filter *filter, u8 coe)
{
    filter->coe = coe;
}

void lv_filter_loop(_lv_filter *filter)
{
    // filter->sum = filter->sum + filter->input - filter->output;
    // filter->output = (u16)(filter->sum >> filter->coe);
    // filter->output = filter->sum >> filter->coe;
}




